﻿using System;
using System.Linq;
using System.Collections.Generic;
using Topics.Radical.ComponentModel.Messaging;
using Topics.Radical.Validation;
using Raven.Client;
using SampleApp.MvcBackend.ComponentModel;
using SampleApp.MvcBackend.Runtime;

namespace SampleApp.MvcBackend.Services
{
	class CommitDispatchScheduler : AbstractDispatchScheduler<Commit, CommitDispatchConsumer>, ICommitDispatchScheduler, IRequireToStart
	{
		public CommitDispatchScheduler( IDocumentStore documentSessionFactory, IMessageBroker broker )
			: base( documentSessionFactory, broker )
		{

		}

		protected override CommitDispatchConsumer CreateConsumer( IMessageBroker broker, IDocumentStore documentSessionFactory )
		{
			var consumer = new CommitDispatchConsumer( broker, documentSessionFactory );

			return consumer;
		}
	}
}
